﻿namespace CatClient.Message.Spi
{
    using CatClient.Configuration;
    using CatClient.Message;
    using CatClient.Message.Spi.Internals;
    using System;

    public interface IMessageManager
    {
        void Add(IMessage message);
        void Bind(string tag, string title);
        void End(ITransaction transaction);
        void FreeSecondKey();
        MessageIdFactory GetMessageIdFactory();
        bool HasContext();
        void InitializeClient(ClientConfig config);
        void Reset();
        void SecondSetup(string contextKey);
        void SetCurrent(string contextKey);
        void SetMainContextToCurrent(bool force);
        void Setup();
        void Setup(IMessageTree tree);
        void Setup(string contextKey);
        void Start(ITransaction transaction, bool forked);

        ClientConfig ClientConfig { get; }

        ITransaction PeekTransaction { get; }

        IMessageTree ThreadLocalMessageTree { get; }

        bool CatEnabled { get; }
    }
}

